﻿using System.Windows;
using Microsoft.Phone.Controls;
using System.Windows.Media.Animation;
using System;
using System.Windows.Input;
using Reading.Controls;
using Reading.ViewModels;

namespace Reading
{
    public partial class MainPage : PhoneApplicationPage
    {
        // 构造函数
        public MainPage()
        {
            InitializeComponent();

            Loaded += OnPageLoaded;
        }

        void OnPageLoaded(object sender, RoutedEventArgs e)
        {
            readingControl.Height = this.LayoutRoot.ActualHeight;

            DataContext = new ReadingContext();
        }


        private void OnGoClick(object sender, EventArgs e)
        {
            this.readingControl.Next();
        }

        private void OnBackClick(object sender, EventArgs e)
        {
            this.readingControl.Previous();
        }
    }
}